import { xhr } from '../plugins/request'


// export const getlits = XHTHttpRequest('http://localhost:4000/blog/update')

export const getlits = (data = { pageNo: 1, pageSize: 10 }) => xhr('http://localhost:4000/blog/list', data, 'GET');
// 获取博客详情
export const blogDetail = (data) => xhr('http://localhost:4000/blog/blogdateli', data);

export const add = (data) => xhr('http://localhost:4000/blog/add', data);

export const classblist = () => xhr('http://localhost:4000/classificationB/list', {}, 'GET')

// 文件上传
export const updateFile = (data) => xhr('http://localhost:4000/updateFiles', data)

// 发布评论
export const discussAdd = data => xhr('http://localhost:4000/discuss/add', data)

// 获取博客评论
export const getblogdiscuss = data => xhr('http://localhost:4000/discuss/getblogdiscuss', data)

export const scatteredAdd = data =>xhr('http://localhost:4000/scattered/add',data)
